package com.kfm.pm.student;

public class Test02 {

    public static void main(String[] args) {

        Driver driver = new Driver() {
            @Override
            public void drive() {
                System.out.println("我开车");
            }
        };

        // 子类 不知道名字
        // new 子类（无名）;
        Actor actor = new Actor() {
            @Override
            void yanXi() {
                System.out.println("演员演戏演到你流泪。");
            }
        };
        driver.drive();
        actor.yanXi();
    }
}

abstract class Actor {

    abstract void yanXi();
}

interface Driver {
    void drive();
}
